<template>
  <div >
    <!-- 基本信息 -->
    <div class="mt10" style=" display: flex;border-bottom: 1px solid #ebedf0;">
      <div class="blue_item" />
      <span class="font15" style="display: flex; line-height: 33px;margin-left:5px;  flex:1;">合同信息</span>
    </div>
    <el-table :data="fromdata.contractInfoList" border style="width: 100%">
      <el-table-column prop="contractType" label="收支合同类型" width="120"/>
      <el-table-column prop="contractNumber" label="合同编号" width="180"/>
      <el-table-column prop="contractName" label="合同名称" width="180"/>
      <el-table-column prop="executorName" label="主执行人姓名" width="120"/>
      <el-table-column prop="signedDate" label="合同生效时间" width="120"/>
      <el-table-column prop="startDate" label="履行开始时间" width="120"/>
      <el-table-column prop="endDate" label="履行结束时间" width="120"/>
      <el-table-column prop="contractAmount" label="计划合同金额" width="120"/>
    </el-table>
    <div class="mt10" style=" display: flex;border-bottom: 1px solid #ebedf0;">
      <div class="blue_item" />
      <span class="font15" style="display: flex; line-height: 33px;margin-left:5px;  flex:1;">业务信息</span>
    </div>
    <van-field readonly required name="mobileApplicant" :value="fromdata.mobileApplicant" label="移动侧申请人：" label-width="7em" />
    <van-field readonly required name="applicantTelephone" :value="fromdata.applicantTelephone" label="申请人电话：" label-width="6em" />
    <van-field readonly required name="customerContact" :value="fromdata.customerContact" label="客户侧联系人：" label-width="7em" />
    <van-field readonly required name="customerTelephone" :value="fromdata.customerTelephone" label="客户联系电话：" label-width="7em" />
    <van-field readonly required name="terminationAdoptTime" :value="fromdata.terminationAdoptTime" label="项目终止决策通过日期：" label-width="11em" />
    <van-field readonly required autosize type="textarea" rows="1" name="projectEndReason" :value="fromdata.projectEndReason" label="项目终止原因：" label-width="7em" />
    <van-field readonly label="项目终止客户侧依据文件：" label-width="12em" />
    <div v-for="(fileitem) in fromdata.projectCustomerFileList" :key="fileitem.id" style="margin-left:20px">
      <div readonly class="font14 fileLink" style="color:#0F85CF">
        <a target="_blank" @click="openFileUrlfun(fileitem.anonymousFilePath)">{{ fileitem.fileName }}</a>
      </div>
    </div>
    <van-field readonly label="项目终止移动侧附件：" label-width="12em" />
    <div v-for="(fileitem) in fromdata.projectMobileFileList" :key="fileitem.id" style="margin-left:20px">
      <div readonly class="font14 fileLink" style="color:#0F85CF">
        <a target="_blank" @click="openFileUrlfun(fileitem.anonymousFilePath)">{{ fileitem.fileName }}</a>
      </div>
    </div>
    <van-field readonly autosize type="textarea" rows="1" name="remark" :value="fromdata.remark" label="备注：" label-width="3em" />
    <div style="margin-bottom: 50px"></div>
  </div>
</template>
<script>
import { mapGetters } from "vuex"
import {openFileUrl} from "@/store/openFile";

export default {
  data() {
    return {}
  },
  computed: {
    ...mapGetters(['user']),
  },
  props: ['fromdata','todotype','params'],
  methods: {
    openFileUrlfun(value) {
      this.$router.push(
          {
            name: 'fileview',
            query: {
              openFileUrl: openFileUrl(value)
            }
          }
      );
    }
  },
}
</script>

<style>
.tables.el-table .cell {
  -webkit-box-sizing: border-box;
  box-sizing: border-box;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: normal;
  word-break: break-all;
  line-height: 15px;
  padding-left: 5px;
  padding-right: 5px;
}
</style>